<template>
  <view class="body">
    <!-- <view class="tips">
      依据国家相关法律要求，互联网就医实行实名制，为保证顺利享受健康服务，请填写真实信息，婴幼儿身份信息请查看户口本
    </view> -->
    <view class="patient-title">
      就诊人信息
    </view>
    <view class="data_form">
      <form>
        <view class="form_item">
          <view class="title"><text style="color: red">*</text>姓名</view>
          <input
            class="form_input"
            type="text"
            maxlength="10"
            v-model="state.userInfo.name"
            placeholder="请输入就诊人姓名"
            :border="false"
          />
        </view>
        <view class="form_item">
          <view class="title"><text style="color: red">*</text>证件类型</view>
          <view class="pop_select" @tap="type == 'add' ? (show2 = true) : (show2 = false)">
            <input
              class="form_input pop_input"
              style="pointer-events: none"
              :class="type == 'update' ? 'color999' : ''"
              v-model="state.userInfo.cardType"
              disabled
              placeholder="请选择证件类型"
              :border="false"
            />
            <image v-if="type != 'update'" class="img_more" src="https://ainengli.meilianshuke.com/jkhx/raozg/more.png" />
          </view>
        </view>
        <view class="form_item">
          <view class="title"><text style="color: red">*</text>证件号</view>
          <input
            class="form_input"
            :type="state.userInfo.cardType === '居民身份证' ? 'idcard' : 'text'"
            :disabled="type == 'update'"
            :class="type == 'update' ? 'color999' : ''"
            :adjust-position="false"
            v-model="state.userInfo.idCard"
            placeholder="请输入证件号"
            :border="false"
          />
        </view>
        <view v-if="state.userInfo.cardType !== '居民身份证'" class="form_item">
          <view class="title"><text style="color: red">*</text>性别</view>
          <radio-group @change="groupChange" class="radio_group">
            <label class="radio_btn" style="margin-right: 32rpx">
              <radio
                :disabled="type == 'update'"
                :checked="state.userInfo.sex == 1"
                color="#00d1b6"
                value="1"
              >
              </radio>
              <text>男性</text>
            </label>
            <label class="radio_btn">
              <radio
                :disabled="type == 'update'"
                :checked="state.userInfo.sex == 2"
                color="#00d1b6"
                value="2"
              >
              </radio>
              <text>女性</text>
            </label>
          </radio-group>
        </view>
        <view v-if="state.userInfo.cardType !== '居民身份证'" class="form_item">
          <view class="title"><text style="color: red">*</text>生日</view>
          <picker
            :disabled="type == 'update'"
            mode="date"
            :end="dayjs(new Date()).format('YYYY-MM-DD')"
            :start="'1920-01-01'"
            :value="initDate"
            @change="setBirth"
          >
            <view class="pop_select">
              <input
                class="form_input pop_input"
                style="pointer-events: none"
                v-model="state.userInfo.birthday"
                disabled
                placeholder="请选择日期"
                :border="false"
              />
              <image class="img_more" src="https://ainengli.meilianshuke.com/jkhx/raozg/more.png" />
            </view>
          </picker>
        </view>
        <view class="form_item">
          <view class="title">手机号</view>
          <input
            class="form_input"
            type="number"
            v-model="state.userInfo.phone"
            placeholder="请输入手机号"
            :border="false"
          />
        </view>
        <view class="form_item">
          <view class="title">民族</view>
          <view class="pop_select" @tap="show3 = true">
            <input
              class="form_input pop_input"
              style="pointer-events: none"
              v-model="state.userInfo.nation"
              disabled
              placeholder="请选择民族"
              :border="false"
            />
            <image class="img_more" src="https://ainengli.meilianshuke.com/jkhx/raozg/more.png" />
          </view>
        </view>
        <view class="form_item">
          <view class="title"><text style="color: red">*</text>与本人关系</view>
          <view class="pop_select" @tap="show = true">
            <input
              class="form_input pop_input"
              style="pointer-events: none"
              v-model="state.userInfo.relation"
              disabled
              placeholder="请选择"
              :border="false"
            />
            <image class="img_more" src="https://ainengli.meilianshuke.com/jkhx/raozg/more.png" />
          </view>
        </view>
        <view class="form_item">
          <view class="title">家庭住址</view>
          <view class="pop_select" @tap="areaPopShow">
            <input
              class="form_input pop_input"
              style="pointer-events: none"
              v-model="state.userInfo.area"
              disabled
              placeholder="请选择省市区"
              :border="false"
            />
            <image class="img_more" src="https://ainengli.meilianshuke.com/jkhx/raozg/more.png" />
          </view>
        </view>
        <view class="form_item detail_address">
          <view class="title">详细地址</view>
          <textarea
            class="form_textarea"
            v-model="state.userInfo.address"
            :show-confirm-bar="false"
            maxlength="50"
            placeholder="如街道、门牌号、小区、乡镇、村等"
            :border="false"
          />
        </view>
      </form>
    </view>
    <com-popup v-if="show" ref="popup" title="请选择与本人关系" :bottom="32" :showTitleBorder="true" :action="false" @close="show = false">
      <view class="lists">
        <view
          v-for="(item, index) in relationList"
          :key="index"
          :class="['item', item.label == state.userInfo.relation ? 'selected' : '']"
          @tap="selectRelation(item)"
        >
          {{ item.label }}
        </view>
      </view>
    </com-popup>
    <com-popup v-if="show2" ref="popup2" title="请选择证件类型" :bottom="32" :showTitleBorder="true" :action="false" @close="show2 = false">
      <view class="lists">
        <view
          v-for="(item, index) in typeList"
          :key="index"
          :class="['item', item.label == state.userInfo.cardType ? 'selected' : '']"
          @tap="selectCardType(item)"
        >
          {{ item.label }}
        </view>
      </view>
    </com-popup>
    <com-popup v-if="show3" ref="popup3" title="请选择民族" :bottom="32" :showTitleBorder="true" :action="false" @close="show3 = false">
      <view class="lists">
        <view
          v-for="(item, index) in nationList"
          :key="index"
          :class="['item', item.label == state.userInfo.nation ? 'selected' : '']"
          @tap="selectNation(item)"
        >
          {{ item.label }}
        </view>
      </view>
    </com-popup>
    <com-popup-new v-if="show4" ref="popup4" :action="false" :showTitleBorder="true" :bottom="32" title="请选择地区" @close="show4 = false" @submit="submitFn" :confirmText="'确定'">
      <picker-view :immediate-change="true" class="gy-picker-view" indicator-style="height: 50px;" :value="adcdData" @change="bindChange">
        <picker-view-column>
          <view class="gy-picker-view-item" v-for="(item, index) in provinceList" :key="item.id">
            {{ item.name }}
          </view>
        </picker-view-column>
        <picker-view-column>
          <view class="gy-picker-view-item" v-for="(item, index) in cityList" :key="item.id">
            {{ item.name }}
          </view>
        </picker-view-column>
        <picker-view-column>
          <view class="gy-picker-view-item" v-for="(item, index) in countyList" :key="item.id">
            {{ item.name }}
          </view>
        </picker-view-column>
      </picker-view>
    </com-popup-new>
    <view class="isdefault">
      <view class="label">设为默认就诊人</view>
      <switch
        :checked="state.userInfo.isDefault"
        @change="switchChange"
        color="#00d1b6"
        style="transform: scale(0.8)"
      />
    </view>
    <view class="fixed">
      <button v-if="type == 'update'" @tap="deleteFamily" class="delete_btn">删除</button>
      <button class="confirm_btn" @tap="save">保存</button>
    </view>
  </view>
</template>

<script setup lang="ts">
import { ref, reactive, getCurrentInstance } from 'vue'
import { patientCreate, patientUpdate, patientDelete, patientGet, dictData, areaTree, getPatientList } from './patient.api'
import { onLoad, onShow } from '@dcloudio/uni-app'
import dayjs from 'dayjs'
const { proxy }: any = getCurrentInstance();

const state = reactive({
  userInfo: {
    name: '',
    cardType: '',
    idCard: '',
    phone: '',
    sex: '',
    birthday: '',
    nation: '',
    relation: '',
    area: '',
    address: '',
    isDefault: false
  }
})
const isDefault = ref(false) // 作判断用默认
const show = ref(false)
const show2 = ref(false)
const show3 = ref(false)
const show4 = ref(false)
const initDate = ref(dayjs(new Date('2000-01-01')).format('YYYY-MM-DD'))
const type = ref('')
const patientInfo = ref({})
const info = ref({})
const relationList = ref([])
const typeList = ref([])
const nationList = ref([])

// 行政区划

const adcdData = ref([0, 0, 0])
const areaDataInfo = ref([])
const showAdcd = ref(false)

const provinceList = ref([])
const cityList = ref([])
const countyList = ref([])

onLoad(async (option) => {
  type.value = option.type ? option.type : ''
  await getDictData()
  if (option.type && option.type == 'add') {
    state.userInfo.name = ''
    state.userInfo.cardType = '居民身份证'
    state.userInfo.idCard = ''
    state.userInfo.phone = ''
    state.userInfo.relation = ''
    state.userInfo.nation = ''
    state.userInfo.area = ''
    state.userInfo.address = ''
    state.userInfo.isDefault = false
    uni.setNavigationBarTitle({
      title: '添加就诊人'
    })
  } else {
    let params = {
      id: option.userId,
    }
    getPatInfo(params)
  }
  console.log('当前就诊人', proxy.store.patient.current)
})
onShow(() => {
  info.value = uni.getStorageSync('system-userinfo') ? uni.getStorageSync('system-userinfo') : {}
})

const getDictData = () => {
  dictData({type: 'relationship'}).then((res) => {
    relationList.value = res
  })
  dictData({type: 'cert_type'}).then((res) => {
    typeList.value = res
  })
  dictData({type: 'nation'}).then((res) => {
    nationList.value = res
  })
  areaTree().then((res) => {
    provinceList.value = res
    cityList.value = res[0].children
    countyList.value = res[0].children[0].children
  })
}
const areaPopShow = () => {
  if (areaDataInfo.value.length == 0) {
    areaDataInfo.value = [provinceList.value[0], cityList.value[0], countyList.value[0]]
  } else {
    let index1 = provinceList.value.findIndex((val) => { return areaDataInfo.value[0].id == val.id })
    cityList.value = provinceList.value[index1].children
    let index2 = cityList.value.findIndex((val) => { return areaDataInfo.value[1].id == val.id })
    countyList.value = cityList.value[index2].children
    let index3 = countyList.value.findIndex((val) => { return areaDataInfo.value[2].id == val.id })
    console.log('编辑的地址', index1, index2, index3, provinceList.value, cityList.value, countyList.value)
    adcdData.value[0] = index1
    adcdData.value[1] = index2
    adcdData.value[2] = index3
  }
  show4.value = true
}
const bindChange = (e) => {
  if (e.detail.value[0] !== adcdData.value[0]) {
    adcdData.value[0] = e.detail.value[0]
    adcdData.value[1] = 0
    adcdData.value[2] = 0
  } else if (e.detail.value[1] !== adcdData.value[1]) {
    adcdData.value[1] = e.detail.value[1]
    adcdData.value[2] = 0
  } else {
    adcdData.value = e.detail.value
  }
  cityList.value = provinceList.value[e.detail.value[0]].children
  countyList.value = cityList.value[e.detail.value[1]]?.children
  let provinceInfo = provinceList.value[e.detail.value[0]]
  let cityInfo = provinceInfo.children[e.detail.value[1]]
  let countyInfo = cityInfo.children[e.detail.value[2]]
  areaDataInfo.value = [provinceInfo, cityInfo, countyInfo]
  // state.userInfo.area = provinceInfo.name + '-' + cityInfo.name + '-' + countyInfo.name
  console.log('选中数据', e, areaDataInfo.value, adcdData.value)
}
const submitFn = () => {
    state.userInfo.area = areaDataInfo.value[0].name + '-' + areaDataInfo.value[1].name + '-' + areaDataInfo.value[2].name
    show4.value = false
}
const getPatInfo = (params: any) => {
  patientGet(params).then((res) => {
    patientInfo.value = res
    state.userInfo.name = res.patientName
    state.userInfo.idCard = res.certNo
    state.userInfo.phone = res.mobile
    state.userInfo.nation = nationList.value.filter((val) => val.value == res.nation)[0]?.label
    state.userInfo.relation = relationList.value.filter((val) => val.value == res.relationship)[0]?.label
    state.userInfo.isDefault = res.defaultPatient
    state.userInfo.cardType = typeList.value.filter((val) => val.value == res.certType)[0]?.label,
    state.userInfo.sex = Number(res.gender)
    state.userInfo.address = res.address
    state.userInfo.area = res.provinceName ? (res.provinceName + '-' + res.cityName + '-' + res.countyName) : ''
    state.userInfo.birthday = dayjs(new Date(res.birthday)).format('YYYY-MM-DD')
    initDate.value = new Date(res.birthday)
    isDefault.value = res.defaultPatient
    // 赋值地区
    if (res.provinceName && res.cityName && res.countyName) {
      let provinceInfo = {
        name: res.provinceName,
        id: res.provinceCode
      }
      let cityInfo = {
        name: res.cityName,
        id: res.cityCode
      }
      let countyInfo = {
        name: res.countyName,
        id: res.countyCode
      }
      areaDataInfo.value = [provinceInfo, cityInfo, countyInfo]
    }
  })
}

const groupChange = (e) => {
  state.userInfo.sex = e.detail.value
}
const setBirth = (e) => {
  state.userInfo.birthday = e.detail.value
}

const selectRelation = (item: any) => {
  state.userInfo.relation = item.label
  show.value = false
}
const selectCardType = (item: any) => {
  state.userInfo.cardType = item.label
  if (item.value == '1') {
    state.userInfo.sex = ''
    state.userInfo.birthday = ''
  }
  show2.value = false
}
const selectNation = (item: any) => {
  state.userInfo.nation = item.label
  show3.value = false
}
const switchChange = (e) => {
  state.userInfo.isDefault = e.detail.value
}

const deleteFamily = () => {
  if (isDefault.value) {
    uni.showToast({
      title: '不能删除默认就诊人！',
      icon: 'none'
    })
    return
  }
  uni.showModal({
    title: '提示',
    content: '确认要删除该就诊人吗?',
    success: function (res) {
      if (res.confirm) {
        deletePatient()
      }
    }
  })
}

const deletePatient = () => {
  uni.showLoading()
  patientDelete({ id: patientInfo.value.id }).then((res) => {
    if (proxy.store.patient.current.id == patientInfo.value.id) {
      // 如果删除的是当前就诊人则将当前就诊人改为默认就诊人
      getPatientList().then((res) => {
        let defaultOne = res.records.find((item: any) => {
          return item.defaultPatient == 1
        })
        patientGet({id: defaultOne.id}).then((res) => {
          const info = res
          proxy.store.setPatientInfo(info)
        })
      })
    }
    uni.hideLoading()
    uni.showToast({
      title: '删除成功',
      icon: 'none',
      position: 'top',
      duration: 2000
    })
    setTimeout(() => {
      uni.navigateBack({ delta: 0 })
    }, 2000)
  })
}

const save = () => {
  let chineseReg = /^[\u4e00-\u9fa5]+$/
  let reg = /^[a-zA-Z]{1}[a-zA-Z0-9]{8}$/
  let HMreg = /^[HM]\d{10}$/
  let phoneReg = /^1[1234567890]\d{9}$/
  if (state.userInfo.name == '') {
    uni.showToast({
      title: '请输入姓名',
      icon: 'none'
    })
    return
  }
  if (chineseReg.test(state.userInfo.name) === false) {
    uni.showToast({
      title: '请输入中文姓名',
      icon: 'none'
    })
    return
  }
  if (
    type.value == 'add' &&
    state.userInfo.cardType == '居民身份证' &&
    !proxy.utils.idCard.verify(state.userInfo.idCard)
  ) {
    uni.showToast({
      title: '请输入正确身份证号码',
      icon: 'none',
      position: 'top',
      //显示持续时间为 2秒
      duration: 2000
    })
    return false
  }
  if (
    type.value == 'add' &&
    state.userInfo.cardType == '护照' &&
    reg.test(state.userInfo.idCard) === false
  ) {
    uni.showToast({
      title: '请输入正确证件号',
      icon: 'none',
      position: 'top',
      duration: 2000
    })
    return
  }
  if (
    type.value == 'add' &&
    state.userInfo.cardType == '港澳居民来往内地通行证' &&
    HMreg.test(state.userInfo.idCard) === false
  ) {
    uni.showToast({
      title: '请输入正确证件号',
      icon: 'none',
      position: 'top',
      duration: 2000
    })
    return
  }
  if (state.userInfo.cardType !== '居民身份证' && !state.userInfo.sex) {
    uni.showToast({
      title: '请选择性别',
      icon: 'none',
      position: 'top',
      duration: 2000
    })
    return
  }
  if (state.userInfo.cardType !== '居民身份证' && !state.userInfo.birthday) {
    uni.showToast({
      title: '请选择出生年月',
      icon: 'none',
      position: 'top',
      duration: 2000
    })
    return
  }
  if (state.userInfo.phone != '' && phoneReg.test(state.userInfo.phone) === false) {
    uni.showToast({
      title: '请输入正确手机号',
      icon: 'none',
      position: 'top',
      duration: 2000
    })
    return
  }
  if (!state.userInfo.relation) {
    uni.showToast({
      title: '请选择与本人关系',
      icon: 'none',
      position: 'top',
      duration: 2000
    })
    return
  }
  if (isDefault.value && !state.userInfo.isDefault) {
    uni.showToast({
      title: '至少有一位默认就诊人',
      icon: 'none'
    })
    return
  }
  // uni.showLoading({
  //   mask: true,
  //   complete: () => {
  //     setTimeout(() => {
  //       uni.hideLoading()
  //     }, 2000)
  //   }
  // })
  let params = {}
  if (type.value == 'add') {
    params = {
      userId: info.value.userId,
      certNo: state.userInfo.idCard,
      mobile: state.userInfo.phone,
      nation: nationList.value.filter((val) => val.label == state.userInfo.nation)[0]?.value,
      address: state.userInfo.address,
      relationship: relationList.value.filter((val) => val.label == state.userInfo.relation)[0]?.value,
      defaultPatient: state.userInfo.isDefault ? 1 : 0,
      patientName: state.userInfo.name,
      gender: Number(state.userInfo.sex),
      birthday: state.userInfo.birthday,
      provinceName: areaDataInfo.value[0]?.name,
      provinceCode: areaDataInfo.value[0]?.id,
      cityName: areaDataInfo.value[1]?.name,
      cityCode: areaDataInfo.value[1]?.id,
      countyName: areaDataInfo.value[2]?.name,
      countyCode: areaDataInfo.value[2]?.id,
      certType: typeList.value.filter((val) => val.label == state.userInfo.cardType)[0]?.value,
    }
    patientCreate(params).then(async (res) => {
      uni.showToast({
        title: '保存成功'
      })
 
      // if (!proxy.store.patient.current) {
      //   getPatientList().then((res) => {
      //     console.log('列表是', res)
      //     patientGet({id: res.records[0].id}).then((ret) => {
      //       const info = ret
      //       proxy.store.setPatientInfo(info)
      //     })
      //   })
      // }
      await proxy.store.initPatientList();
      
      uni.navigateBack({ delta: 0 })
    })
  } else {
    params = {
      id: patientInfo.value.id,
      userId: info.value.userId,
      certNo: state.userInfo.idCard,
      mobile: state.userInfo.phone,
      nation: nationList.value.filter((val) => val.label == state.userInfo.nation)[0]?.value,
      address: state.userInfo.address,
      relationship: relationList.value.filter((val) => val.label == state.userInfo.relation)[0]?.value,
      defaultPatient: state.userInfo.isDefault ? 1 : 0,
      patientName: state.userInfo.name,
      gender: Number(state.userInfo.sex),
      birthday: state.userInfo.birthday,
      provinceName: areaDataInfo.value[0]?.name,
      provinceCode: areaDataInfo.value[0]?.id,
      cityName: areaDataInfo.value[1]?.name,
      cityCode: areaDataInfo.value[1]?.id,
      countyName: areaDataInfo.value[2]?.name,
      countyCode: areaDataInfo.value[2]?.id,
    }
    patientUpdate(params).then(async (res) => {
      uni.showToast({
        title: '保存成功'
      })

      await proxy.store.initPatientList(patientInfo.value.id);

      uni.navigateBack({ delta: 0 })
    })
  }
  console.log('添加入参', params)
}
</script>

<style lang="scss" scoped>
.body {
  background: #f3f7f8;
  overflow: auto;
  padding-bottom: calc(220rpx + constant(safe-area-inset-bottom));
  padding-bottom: calc(220rpx + env(safe-area-inset-bottom));
  .tips {
    background: #fff7e8;
    padding: 16rpx 32rpx;
    font-weight: 400;
    font-size: 28rpx;
    color: #ff7d00;
    line-height: 39rpx;
  }
  .patient-title {
    margin: 32rpx;
    font-weight: 700;
    font-size: 32rpx;
    color: #222222;
  }
  .data_form {
    background: #ffffff;
    border-radius: 16rpx;
    padding: 0 32rpx;
    margin: 24rpx 32rpx;
    .form_item {
      display: flex;
      border-bottom: 1rpx solid #e5e6eb;
      height: 108rpx;
      align-items: center;
      position: relative;
      .title {
        width: 200rpx;
        font-weight: 500;
        font-size: 30rpx;
        color: #222222;
      }
      .radio_group {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        align-items: center;
      }
      .form_input {
        width: 100%;
        border: none;
        text-align: right !important;
        font-weight: 400 !important;
        font-size: 30rpx !important;
        ::v-deep .uni-input-placeholder {
          text-align: right;
          color: #cccccc !important;
        }
        ::v-deep .uni-input-input {
          text-align: right;
          // direction: rtl;
          color: #222 !important;
        }
      }
      .pop_select {
        width: 470rpx;
        position: relative;
      }
      .pop_input {
        width: 90%;
      }
      .color999 {
        color: #999;
        width: 100%;
      }
      .img_more {
        width: 40rpx;
        height: 40rpx;
        position: absolute;
        right: 0;
        top: 2rpx;
      }
    }
    .form_item:last-child {
      border: none;
    }
    .detail_address {
      height: 236rpx;
      flex-wrap: wrap;
      padding-top: 32rpx;
      .form_textarea {
        width: 100%;        
        max-height: 102rpx;
        padding: 16rpx 0;
        margin-top: 20rpx;
        text-align: left;
      }
    }
    // 单选框样式
    ::v-deep .u-radio-group {
      justify-content: flex-end;
      gap: 24rpx;
      .u-radio__icon-wrap {
        width: 40rpx !important;
        height: 40rpx !important;
      }
      .u-icon__icon {
        font-size: 28rpx !important;
      }
      .u-radio__text {
        font-size: 28rpx !important;
        color: #222 !important;
      }
    }
  }
  ::v-deep .u-datetime-picker {
    display: none;
  }
  .lists {
    padding: 32rpx;
    .item {
      height: 96rpx;
      line-height: 96rpx;
      box-sizing: border-box;
      border-radius: 8rpx;
      background: #fafafa;
      text-align: center;
      padding: 0 32rpx;
      font-weight: 500;
      font-size: 32rpx;
      color: #222222;
      margin-bottom: 24rpx;
    }
    .selected {
      background: rgba(0,209,182,0.1);
      border: 1rpx solid #00D1B6;
      color: #00D1B6;
    }
    .item:last-child {
      margin-bottom: 0;
    }
  }
  .isdefault {
    background: #ffffff;
    border-radius: 16rpx;
    padding: 30rpx 32rpx;
    margin: 0 32rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .label {
      font-weight: 500;
      font-size: 30rpx;
      color: #222222;
    }
    ::v-deep .uni-switch-input:before {
      background: #e5e6eb;
    }
  }
  .fixed {
    position: fixed;
    width: 100%;
    bottom: 0;
    left: 0;
    z-index: 10;
    padding: 24rpx 32rpx;
    padding-bottom: calc(24rpx + constant(safe-area-inset-bottom));
    padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
    box-sizing: border-box;
    background: #ffffff;
    display: flex;
    gap: 24rpx;
    .confirm_btn {
      width: 100%;
      background: #00d1b6;
      border-radius: 44rpx;
      font-weight: 500;
      font-size: 32rpx;
      color: #ffffff;
    }
    .delete_btn {
      width: 100%;
      background: #ffffff;
      border-radius: 44rpx;
      border: 1px solid #cfcfcf;
      font-weight: 400;
      font-size: 32rpx;
      color: #666666;
    }
    button::after {
      border: none;
    }
  }
  ::v-deep .uicon-close {
    font-size: 32rpx !important;
    line-height: 50rpx !important;
  }
  ::v-deep .u-modal__title {
    font-weight: 500 !important;
    font-size: 36rpx !important;
    color: #222222 !important;
  }
  ::v-deep .u-modal__content view {
    color: #666 !important;
  }
  .gy-picker-view {
    width: 100%;
    height: 500rpx;
    .gy-picker-view-item {
        height: 100rpx;
        @include flex-center-center;
        font-size: var(--gy-font-size-medium);
    }
	}
}
</style>
